package com.spzx.JUC2.test5;

import lombok.SneakyThrows;

public class PrintDemo {

    @SneakyThrows
    public static void main(String[] args) {


        Printer printer = new Printer();
        new Thread(()->{

            try {
                printer.print();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }).start();

        new Thread(()->{
           printer.printChar();

        }).start();
    }



}
